Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "root" node #341

Merged
merged 1 commit into from
Dec 27, 2013
Merged

Conversation

jugglinmike
Copy link
Member

This should resolve issue #162. Note that I had to change some tests, but this was only necessary in those cases with explicit references to the root object.

Commit message:

Cheerio uses a "root" object internally to collect parsed markup with
multiple top-level nodes. This object is not itself a node, but
modelling it as such can interfere with the parsing and traversing logic
that Cheerio relies on.

Attach the "root" object via an API that is not recognized by the
traversal logic so that it is not exposed through querying operations.

Cheerio uses a "root" object internally to collect parsed markup with
multiple top-level nodes. This object is not itself a node, but
modelling it as such can interfere with the parsing and traversing logic
that Cheerio relies on.

Attach the "root" object via an API that is not recognized by the
traversal logic so that it is not exposed through querying operations.
@matthewmueller
Copy link
Member

sweeeeet. i've been wanting to get rid of that root node forever. thanks!

matthewmueller added a commit that referenced this pull request Dec 27, 2013
@matthewmueller matthewmueller merged commit 6a43ac9 into cheeriojs:master Dec 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants